<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title><?php 
echo $conf['sitename'];
?> - 注册授权</title>
<link rel="icon" href="../favicon.ico" type="image/ico">
<meta name="description" content="<?php echo $conf['description']?>">
<meta name="keyword" content="<?php echo $conf['keywords']?>">
<meta name="author" content="yinqi">
<link href="<?=userassets?>LightYearifname/css/bootstrap.min.css" rel="stylesheet">
<link href="<?=userassets?>LightYearifname/css/materialdesignicons.min.css" rel="stylesheet">
<link rel="stylesheet" href="<?=userassets?>LightYearifname/js/bootstrap-multitabs/multitabs.min.css">
<link href="<?=userassets?>LightYearifname/css/style.min.css" rel="stylesheet">
<script src="<?=JQueryJS?>"></script>
<script src="<?=LayerJS?>"></script>
</head>
<script type="text/javascript" src="<?=userassets?>LightYearifname/js/jquery.min.js"></script>
<script type="text/javascript" src="<?=userassets?>LightYearifname/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?=userassets?>LightYearifname/js/main.min.js"></script>


<div class="container-fluid p-t-15">
        <div class="row">
            <div class="col-md-12 col-lg-12 col-xl-6">
                <div class="card bg-white m-b-30">
                    <div class="card-body new-user">
                        <h4 class="header-title mb-4 mt-0">您未注册授权 请先注册授权后在试</h4>
                         <div class="panel-body">
                                <div class="form-group">
                                    <label>您的注册码是：<?=Machine_effectproduce();?></label>
                                    <textarea type="password" id="token" name="token" placeholder="请输入您获得的token" rows = "10" cols="30"class="form-control"></textarea>
                                </div>
                                <div class="form-group">
                                    <button type="button" class="btn btn-block btn-primary" onclick="Token_effect();">确定</button>
                                </div>
                         </div>
                    </div>
                </div>
            </div>
        </div>
 </div>
 
 <script>
     function Token_effect(){
         var token= $("#token").val();
         var ii = layer.load(3, {shade:[0.1,'#fff']});
         $.ajax({
             type : "POST",
             url : "/plugins/api/alipayjk/Token_effect",
             data : {
                token
             },
             dataType : 'json',
             timeout:10000,
             success : function(data) {
                 layer.close(ii);
                 if(data.code==200){
                     layer.msg(data.msg, {
    						icon: 1,
    						time: 2000
    						
    					},function(){
    				         location.reload();
    				});
                 }else{
                   layer.msg(data.msg, {
    						icon: 2,
    						time: 1000
    				}); 
                }
             },
             error:function(data){
                    layer.close(ii);
                    layer.msg('服务器错误');
             }
         });
     }
 </script>